{layout name="define/layout" /}

<body>
    <div class="header">
        <div class="layout fn-clear">
            <div class="user-logo">
                <a href="javascript:;"></a>
            </div>
            <div class="user-n"><span>个人中心</span></div>
            <ul class="nav">
                <li class="nav-item"><a class="nav-link" href="javascript:MAC.GoBack()">返回</a></li>
                <li class="nav-item"><a class="nav-link" href="/">返回首页</a></li>
                <li class="nav-item"><a class="nav-link">{$info['user_name']}</a></li>
                <li class="nav-item"><a class="nav-link" href="/user/logout.html">退出</a></li>
            </ul>
        </div>
    </div>
    <!-- // i-header end -->


    <!-- 会员中心 -->
    <div id="member" class="fn-clear">
        <div id="left">
            <div class="m-nav">
                <a href="javascript:MAC.GoBack()" class="btn-left"><i class="iconfont ico-right">&#xe625;</i></a>
                <a href="/" class="btn-right"><i class="iconfont ico-right">&#xe634;</i></a>
                <span class="mb-title">个人中心</span>
            </div>
            <div class="tou">
                <div class="tou-left">
                    <img class="face" src="{$info['user_pic']}" alt="会员头像">
                </div>
                <div class="tou-right">
                    <span class="name-tit">{$info['user_name']}</span>
                </div>
            </div>
            <div class="menber-info">
                <div class="info-box">
                    <p class="m-points">{$info['user_points']}</p>
                    <p class="text-small">我的余额</p>
                </div>
                <div class="info-box"><a href="/user/popedom.html">
                        <a href="/user/popedom.html">
                            {eq name="$info['user_status']" value='0'}
                            <p>普通用户</p>
                            <p class="text-small">永久有效</p>
                            {else}
                            <p>网站会员</p>
                            <p class="text-small">{:date('Y-m-d',$info['user_status_time'])}</p>
                            {/eq}
                        </a>
                </div>
            </div>
            <ul>
                <li><a class="flip" href="javascript:void(0)"><span class="xs1"><i
                                class="iconfont huiyuan ver_none">&#xe661;</i>推荐有礼<i
                                class="iconfont ico-right">&#xe623;</i></span><span class="xs2" style="display:none;"><i
                                class="iconfont huiyuan ver_none">&#xe661;</i>推荐有礼<i
                                class="iconfont ico-right">&#xe63a;</i></span><span class="user-time">推荐好友赚现金</span></a>
                    <div class="panel" style="display:none;">
                        <p class="hui">抱歉，推荐有礼活动暂未开放</p>
                    </div>
                </li>
            </ul>
            <ul>
                <li><a href="/user/info.html"><i class="iconfont yonghu">&#xe62b;</i>我的资料<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="/user/infoedit.html"><i class="iconfont xiugai">&#xe65e;</i>修改资料<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
            </ul>
            <ul>
                <li><a href="/user/favs.html"><i class="iconfont lishi">&#xe629;</i>我的收藏<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="/user/plays.html"><i class="iconfont lishi">&#xe624;</i>观看记录<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="javascript:errorMsg();"><i class="iconfont lishi">&#xe63c;</i>下载记录<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
            </ul>
            <ul>
                <li><a href="javascript:errorMsg();"><i class="iconfont huiyuan">&#xe638;</i>升级会员<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="javascript:errorMsg();"><i class="iconfont xiazai">&#xe65c;</i>充值中心<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="javascript:errorMsg();"><i class="iconfont xiazai">&#xe660;</i>充值记录<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="javascript:errorMsg();"><i class="iconfont xiazai">&#xe65f;</i>我要提现<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
            </ul>
            <ul>
                <li><a href="javascript:errorMsg();"><i class="iconfont congzhi">&#xe662;</i>积分记录<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="javascript:errorMsg();"><i class="iconfont congzhi">&#xe65d;</i>推荐记录<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
            </ul>
            <ul class="logout-ul">
                <li class="logout-item"><a class="logout-link" href="/user/logout.html">退出账号</a></li>
            </ul>
        </div>
        <div id="right">
            <div class="m-nav">
                <a href="javascript:MAC.GoBack()" class="btn-left"><i class="iconfont ico-right">&#xe625;</i></a>
                <span class="mb-title">修改信息</span>
            </div>
            <div class="co-right co-right-bg author@qq3626-95-000">
                <h2>我的资料</h2>
                <div id="tab">
                    <div class="list">
                        <ul class="fn-clear">
                            <li><a href="/user/info.html">基本资料</a></li>
                            <li class="cur">修改信息</li>
                            <li><a href="/user/popedom.html">我的权限</a></li>
                        </ul>
                    </div>
                    <div id="listCon">
                        <!-- 修改信息 -->
                        <div class="cur">
                            <form id="lycms-infoedit">
                                <p><span class="xiang">用户名</span>{$info['user_name']}</p>
                                <p><span class="xiang">用户昵称</span><input type="text" name="user_nick"
                                        value="{$info['user_nick']}" class="member-input" placeholder="请输入用户昵称">
                                </p>
                                <p><span class="xiang">原始密码</span><input type="password" name="user_pwd"
                                        class="member-input" placeholder="请输入原始密码">
                                </p>
                                <p><span class="xiang">新密码</span><input type="password" name="user_pwd1"
                                        class="member-input" placeholder="请输入新密码">
                                </p>
                                <p><span class="xiang">重复密码</span><input type="password" name="user_pwd2"
                                        class="member-input" placeholder="请重复新密码">
                                </p>
                                <p><span class="xiang">QQ号码</span><input type="text" name="user_qq"
                                        value="{$info['user_qq']}" class="member-input wt-input" placeholder="请输入QQ号">
                                    <a class="bind-a" href="javascript:;">绑定</a></p>
                                <p><span class="xiang">邮箱</span><input type="text" name="user_email"
                                        class="member-input wt-input" value="{$info['user_email']}" placeholder="请输入邮箱">
                                    <a class="bind-a" href="javascript:;">绑定</a></p>

                                <p><input type="button" id="btn_info" class="search-button" value="保存">
                                    <span class="wjmm">
                                        <a href="/user/findpass.html" target="_blank">忘记密码了？找回密码</a>
                                    </span>
                                </p>

                            </form>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $('.btn_unbind').click(function () {
            var ac = $(this).attr('ac');
            if (ac != 'email' && ac != 'phone') {
                alert('参数错误');
            }
            if (confirm('确认解除绑定吗？此操作不可恢复？')) {
                $.ajax({
                    url: "/index.php/user/unbind.html",
                    type: "post",
                    dataType: "json",
                    info: {
                        ac: ac
                    },
                    beforeSend: function () {
                        //开启loading
                    },
                    success: function (r) {
                        alert(r.msg);
                        if (r.code == 1) {
                            location.href = "/index.php/user/info.html";
                        }
                    },
                    complete: function () {
                        //结束loading
                    }
                });
            }
        });

        $("#btn_submit").click(function () {
            var info = $("#fm").serialize();
            $.ajax({
                url: "/index.php/user/info.html",
                type: "post",
                dataType: "json",
                info: info,
                beforeSend: function () {
                    //开启loading
                    //$(".loading_box").css("display","block");
                    $("#btn_submit").css("background", "#fd6a6a").val("loading...");
                },
                success: function (r) {
                    alert(r.msg);
                    if (r.code == 1) {
                        location.href = "/index.php/user/info.html";
                    }
                },
                complete: function () {
                    //结束loading
                    //$(".loading_box").css("display","none");
                    $("#btn_submit").css("background", "#fa4646").val("提交");
                }
            });
        });
    </script>